﻿CREATE TABLE [dbo].[arhAngajatiSporuri] (
    [IdTipSpor]           INT             NOT NULL,
    [IdPersoana]          INT             NOT NULL,
    [DeLaData]            DATETIME        NOT NULL,
    [IdPersoanaSpor]      INT             IDENTITY (1, 1) NOT NULL,
    [PanaLaData]          DATETIME        NULL,
    [Valoare]             DECIMAL (18, 2) DEFAULT ((0)) NOT NULL,
    [Procent]             DECIMAL (6, 2)  DEFAULT ((0)) NOT NULL,
    [ValoarePreaviz]      DECIMAL (18, 2) DEFAULT ((0)) NOT NULL,
    [IDAngajatSalarizare] INT             NULL,
    [Luna]                SMALLINT        NOT NULL,
    [Anul]                SMALLINT        NOT NULL,
    CONSTRAINT [PK_arhAngajatiSporuri] PRIMARY KEY CLUSTERED ([IdPersoanaSpor] ASC),
    CONSTRAINT [FK_arhAngajatiSporuri_arhAngajatiSalarizare] FOREIGN KEY ([IDAngajatSalarizare]) REFERENCES [dbo].[arhAngajatiSalarizare] ([IDAngajatSalarizare]),
    CONSTRAINT [FK_arhAngajatiSporuri_Persoane] FOREIGN KEY ([IdPersoana]) REFERENCES [dbo].[Persoane] ([IdPersoana])
);

